﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using System.Collections.Specialized;
using System.Text.RegularExpressions;

namespace Tests
{
    /// <summary>
    ///  Sample
    /// </summary>
    [TestFixture]
    public class Sample
    {
        [SetUp]
        public void Init()
        {
            // 这里写初始化代码
        }

        [TearDown]
        public void Clearup()
        {
            // 这里清除Init()方法创建的资源
        }

        [Test]
        public void TestMethodName()
        {
            // 正常的测试代码
        }

        [Test]
        [ExpectedException(typeof(Exception))]
        public void ExceptionTestMethodName()
        {
            // 这里的测试代码期待返回一个Exception
            throw new Exception();
        }

        [Test]
        [Ignore("这个方法由于种种原因暂时忽略，不做测试")]
        public void IgnoreTestMethodName()
        {
            // 这里写测试代码
        }

        [Test]
        public void Temp()
        {

            //Assert.AreEqual("", Guid.NewGuid().ToString());
            //Assert.AreEqual("", System.Convert.ToBase64String(new Guid("9338ea33-d288-47c0-93ce-80c14feeffff").ToByteArray()));
            //Assert.AreEqual("",System.Convert.FromBase64String("QUFodHRwOi8vd3d3LmJhaWR1LmNvbS9pbWcvc3NsbTFfbG9nby5naWZaWg==").ToString() );
            //Assert.AreEqual("", System.Convert.ToString(DateTime.Now.ToBinary(),16));
            //Assert.AreEqual("", System.Convert.ToBase64String(BitConverter.GetBytes(DateTime.Now.ToBinary())));
            string pattern = @"[/\\:*?""<>|]";
            Assert.AreEqual("", Regex.Replace(pattern + "dfsdf", pattern, ""));
        }
    }
}